package phone.qyg.com.qyg.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 作者：lblbh on 2017/12/12 10:16
 * 邮箱：lanbuhan@163.com
 * 功能：课程--笔记
 */

public class CourseNote implements Parcelable {

    /**
     “id” :1 //笔记Id
     “title”:”是有一部电影” //笔记电影
     “create_date”:”2017-12-3 21:45”

     //下面是我的笔记内容
     “id”:213      //笔记id
     “courseId”:1  //课程Id
     “title”:”马头琴”     //课程名称
     “create_date”:”2017-12-3”//创建时间
     “content”:”” //笔记内容

     */

    public int id;
    public int courseId;
    public String title;
    public String content;
    public String create_date;


    public CourseNote() {}

    @SuppressWarnings("unchecked")
    public CourseNote(Parcel in) {
        id = in.readInt();
        courseId = in.readInt();
        title = in.readString();
        content = in.readString();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeInt(courseId);
        dest.writeString(title);
        dest.writeString(content);
    }


    public static final Creator<CourseNote> CREATOR = new Creator<CourseNote>() {
        @Override
        public CourseNote[] newArray(int size) {
            return new CourseNote[size];
        }

        @Override
        public CourseNote createFromParcel(Parcel in) {
            return new CourseNote(in);
        }
    };
}
